import request from '@/utils/request'
import { praseStrEmpty } from '@/utils/ruoyi'

// 查询主题集树形数据
export function getThemeSetTree(zoneId) {
  return request({
    url: '/set/getThemeSetTree/' + praseStrEmpty(zoneId),
    method: 'get'
  })
}

// 查询主题集详细
export function getSet(id) {
  return request({
    url: '/set/' + id,
    method: 'get'
  })
}

// 新增主题集
export function addSet(data) {
  return request({
    url: '/set',
    method: 'post',
    data: data
  })
}

// 修改主题集
export function updateSet(data) {
  return request({
    url: '/set',
    method: 'put',
    data: data
  })
}

// 删除主题集
export function delSet(id) {
  return request({
    url: '/set/' + id,
    method: 'delete'
  })
}
//根据父id查询主题集
export function getSetList(query) {
  return request({
    url: '/set/getSetList',
    method: 'get',
    params: query
  })
}

export function getThemeSetByQuotaId(data) {
  return request({
    url: '/set/getThemeSetByQuotaId',
    method: 'post',
    data: data
  })
}



